		{{*  Javascript block local to this form template *}}
		{{$sRegFormJavaScript}}

		{{* The duplicate data error block *}}
		{{if $error || $errorDupPerson}}
			{{include file="registration_admission/reg_error_duplicate.tpl"}}
		{{/if}}

		{{* extra block for additional front text *}}
		{{$pretext}}
		
		{{if $bSetAsForm}}
		<form method="post" action="{{$thisfile}}" name="aufnahmeform" ENCTYPE="multipart/form-data" onSubmit="return chkform(this)">
		{{/if}}

		<table border=0 cellspacing=0 cellpadding=0 {{$sFormWidth}}>
				<tr>
					<td class="reg_item">
						{{$LDRegistryNr}}
					</td>
					<td class="reg_input">
						{{$pid}}
						<br>
						{{$sBarcodeImg}}
					</td>
					<td {{$sPicTdRowSpan}} class="photo_id" align="center">
						<a href="#"  onClick="showpic(document.aufnahmeform.photo_filename)"><img {{$img_source}} name="headpic"></a>
						<br>
						{{$LDPhoto}}
						<br>
						{{$sFileBrowserInput}}
					</td>
				</tr>

				<tr>
					<td  class="reg_item">
						{{$LDRegDate}}
					</td>
					<td class="reg_input">
						<FONT color="#800000">
						{{$sRegDate}}
						<FONT color="#800000">
						{{$sRegTime}}
					</td>
				</tr>

				{{* The following tags contain rows patterned after the  "registration_admission/reg_row.tpl" template *}}

				{{$sPersonTitle}}
				{{$sNameLast}}
				{{$sName2}}
				{{$sName3}}
				{{$sNameMaiden}}
				{{$sNameOthers}}
				{{$sNameFirst}}
				{{$sNameMiddle}}
				{{$sNatIdNr}}

				<tr>
					<td class="reg_item">
						{{$LDEthnicOrig}}
					</td>
					<td class="reg_input" colspan="2">
						{{$sEthnicOrigInput}}
					</td>
				</tr>

				{{$sCitizenship}}

				<tr>
					<td class="reg_item">
						{{$LDBday}}
					</td>
					<td class="reg_input" colspan="2">
						{{$sBdayInput}}&nbsp;{{$sCrossImg}} {{$sDeathDate}}
					</td>
				</tr>
				<tr>
					<td class="reg_item">
						{{$LDSex}}
					</td>
					<td class="reg_input" colspan="2">
						{{$sSexM}} {{$LDMale}}&nbsp;&nbsp; {{$sSexF}} {{$LDFemale}}
					</td>
				</tr>

			{{if $LDBloodGroup}}
				<tr>
					<td class="reg_item">
						{{$LDBloodGroup}}
					</td>
					<td class="reg_input" colspan="2">
						{{$sBGAInput}}{{$LDA}}  &nbsp;&nbsp; {{$sBGBInput}}{{$LDB}} &nbsp;&nbsp; {{$sBGABInput}}{{$LDAB}}  &nbsp;&nbsp; {{$sBGOInput}}{{$LDO}}  &nbsp;&nbsp; {{$sBGIInput}}{{$LDI}}
					</td>
				</tr>
                                <tr>
                                    <td class="reg_item">
                                        {{$LDRH}}
                                    </td>
                                    <td class="reg_input" colspan="2">
                                        {{$sRHPInput}}{{$LDP}} &nbsp;&nbsp; {{$sRHNInput}}{{$LDN}}
                                        {{$sRHIInput}}{{$LDI}}
                                    </td>
                                </tr>
			{{/if}}

<!-- Pais -->
                                <tr>
					<td class="reg_item">
						{{$LDBirthCountry}}
					</td>
					<td class="reg_input" colspan="2">
						{{$sBirthCountryInput}}
					</td>
			        </tr>

<!-- Entidad -->
                                <tr>
					<td class="reg_item">
						{{$LDBirthEntity}}
					</td>
					<td class="reg_input" colspan="2">
						{{$sBirthEntityInput}}{{$sBirthEntityMiniCalendar}}
					</td>
			        </tr>

<!-- Municipio -->
                                <tr>
					<td class="reg_item">
						{{$LDBirthTown}}
					</td>
					<td class="reg_input" colspan="2">
						{{$sBirthTownInput}}{{$sBirthTownMiniCalendar}}
					</td>
			        </tr>

<!-- Ciudad -->
                                <tr>
					<td class="reg_item">
						{{$LDBirthCity}}
					</td>
					<td class="reg_input" colspan="2">
						{{$sBirthCityInput}}{{$sBirthCityMiniCalendar}}
					</td>
			        </tr>

			{{if $LDCivilStatus}}
				<tr>
					<td class="reg_item">
						{{$LDCivilStatus}}
					</td>
					<td class="reg_input" colspan="2">
						{{$sCSSingleInput}}{{$LDSingle}}  &nbsp;&nbsp;
						{{$sCSMarriedInput}}{{$LDMarried}} &nbsp;&nbsp;
						{{$sCSDivorcedInput}}{{$LDDivorced}}  &nbsp;&nbsp;
						{{$sCSWidowedInput}}{{$LDWidowed}} &nbsp;&nbsp;
						{{$sCSSeparatedInput}}{{$LDSeparated}}
					</td>
				</tr>
			{{/if}}

			{{if $LDIlliterate}}
				<tr>
				<td class="reg_item">
					{{$LDIlliterate}}
				</td>
				<td class="reg_input" colspan="2">
					{{$sSiInput}}{{$LDYes}}  &nbsp;&nbsp;
					{{$sNoInput}}{{$LDNo}} &nbsp;&nbsp;
                                        {{$sIInput}}{{$LDI}}
				</td>
				</tr>
			{{/if}}

			{{if $LDEducationalLevel}}
				<tr>
				<td class="reg_item">
					{{$LDEducationalLevel}}
				</td>
				<td colspan=2 class="reg_input">
					{{$sEducationalLevel1Input}}{{$LDEducationalLevel1}}  &nbsp;&nbsp;
					{{$sEducationalLevel2Input}}{{$LDEducationalLevel2}}  &nbsp;&nbsp;
					{{$sEducationalLevel3Input}}{{$LDEducationalLevel3}}  &nbsp;&nbsp;
					{{$sEducationalLevel4Input}}{{$LDEducationalLevel4}}  &nbsp;&nbsp;
					{{$sEducationalLevel5Input}}{{$LDEducationalLevel5}}  &nbsp;&nbsp;
					{{$sEducationalLevel6Input}}{{$LDEducationalLevel6}}  &nbsp;&nbsp;
					{{$sEducationalLevelIInput}}{{$LDI}}
				</td>
				</tr>
			{{/if}}

			{{if $LDEducationalPlan}}
				<tr>
				<td class="reg_item">
					{{$LDEducationalPlan}}
				</td>
				<td colspan=2 class="reg_input">
					{{$sEducationalPlan1Input}}{{$LDEducationalPlan1}}  &nbsp;&nbsp;
					{{$sEducationalPlan2Input}}{{$LDEducationalPlan2}}  &nbsp;&nbsp;
					{{$sEducationalPlan3Input}}{{$LDEducationalPlan3}}  &nbsp;&nbsp;
					{{$sEducationalPlanIInput}}{{$LDI}} &nbsp;&nbsp;
				</td>
				</tr>
			{{/if}}

                                <tr>
					<td class="reg_item">
						{{$LDYearsApproved}}
					</td>
					<td colspan=2 class="reg_input">
						{{$sYearsApprovedInput}}
					</td>
			        </tr>

                                <tr>
					<td class="reg_item">
						{{$LDProfession}}
					</td>
					<td colspan=2 class="reg_input">
						{{$sProfessionInput}}
					</td>
			        </tr>

                                <tr>
					<td class="reg_item">
						{{$LDOccupation}}
					</td>
					<td colspan=2 class="reg_input">
						{{$sOccupationInput}}
					</td>
			        </tr>

			{{if $LDSso}}
				<tr>
				<td class="reg_item">
					{{$LDSso}}
				</td>
				<td class="reg_input" colspan="2">
					{{$sSSOSiInput}}{{$LDSSOYes}}  &nbsp;&nbsp;
					{{$sSSONoInput}}{{$LDSSONo}}   &nbsp;&nbsp;
					{{$sSSOIInput}}{{$LDI}}

				</td>
				</tr>
			{{/if}}

				<tr>
					<td colspan=3 class="reg_input">
						<h2>{{$LDAddress}}</h2>
					</td>
				</tr>

<!-- Entidad -->
				<tr>
					<td class="reg_item">
						{{$LDAddrEntity}}
					</td>
					<td colspan=2 class="reg_input">
						{{$sAddrEntityInput}}{{$sAddrEntityMiniCalendar}}
					</td>
				</tr>
<!-- Municipio -->
				<tr>
					<td class="reg_item">
						{{$LDAddrTown}}
					</td>
					<td colspan=2 class="reg_input">
						{{$sAddrTownInput}}{{$sAddrTownMiniCalendar}}
					</td>
				</tr>
<!-- Parroquia -->
				<tr>
					<td class="reg_item">
						{{$LDTownCity}}
					</td>
					<td colspan=2 class="reg_input">
						{{$sTownCityInput}}{{$sAddrCityTownMiniCalendar}}
					</td>
				</tr>


<!-- Localidad OJO -->
				<tr>
					<td class="reg_item">
						{{$LDAddrLocality}}
					</td>
					<td colspan=2 class="reg_input">
						{{$sAddrLocalityInput}}
					</td>
				</tr>

<!-- Sector -->
				<tr>
					<td class="reg_item">
						{{$LDAddrSector}}
					</td>
					<td colspan=2 class="reg_input">
						{{$sAddrSectorInput}}{{$sAddrSectorMiniCalendar}}
					</td>
				</tr>

<!-- Calle -->
				<tr>
					<td class="reg_item">
						{{$LDStreet}}
					</td>
					<td colspan=2 class="reg_input">
						{{$sStreetInput}}
					</td>
				</tr>

<!-- Casa -->
				<tr>
					<td class="reg_item">
						{{$LDAddrHouse}}
					</td>
					<td colspan=2 class="reg_input">
						{{$sAddrHouseInput}}
					</td>
				</tr>

<!-- Piso -->
				<tr>
					<td class="reg_item">
						{{$LDAddrFloor}}
					</td>
					<td colspan=2 class="reg_input">
						{{$sAddrFloorInput}}
					</td>
				</tr>

<!-- Codigo Postal -->
				<tr>
					<td class="reg_item">
						{{$LDZipCode}}
					</td>
					<td colspan=2 class="reg_input">
						{{$sZipCodeInput}}
					</td>
				</tr>

<!-- Telefonos -->
				{{$sPhone1}}
				{{$sPhone2}}
				{{$sCellPhone1}}
				{{$sCellPhone2}}

<!-- Puntos de Referencia -->
				<tr>
					<td class="reg_item">
						{{$LDAddrReference}}
					</td>
					<td colspan=2 class="reg_input">
						{{$sAddrReferenceInput}}
					</td>
				</tr>

<!-- Tiempo de Residencia -->
				<tr>
					<td class="reg_item">
						{{$LDAddrTime}}
					</td>
					<td colspan=2 class="reg_input">
						{{$sAddrTimeInput}}
					</td>
				</tr>

<!-- Correo Electronico -->
				{{$sEmail}}

<!-- Nombre de la Madre -->
				<tr>
					<td class="reg_item">
						{{$LDNameMother}}
					</td>
					<td colspan=2 class="reg_input">
						{{$sNameMotherInput}}
					</td>
				</tr>

<!-- Nombre del Padre -->
				<tr>
					<td class="reg_item">
						{{$LDNameFather}}
					</td>
					<td colspan=2 class="reg_input">
						{{$sNameFatherInput}}
					</td>
				</tr>

			{{if $bShowInsurance}}

				{{$sInsuranceNr}}

				<tr>
				<td>
					&nbsp;
				</td>
				<td colspan=2 class="reg_input">
					{{$sErrorInsClass}} 
					{{foreach from=$sInsClasses item=InsClass}}
						{{$InsClass}}
					{{/foreach}}
				</td>
				</tr>

				<tr>
				<td class="reg_item">
					{{$LDInsuranceCo}}
				</td>
				<td colspan=2 class="reg_input">
					{{$sInsCoNameInput}} {{$sInsCoMiniCalendar}}
				</td>
				</tr>
			{{/if}}

			{{if $bNoInsurance}}
				<tr>
				<td>
					&nbsp;
				</td>
				<td colspan=2 class="reg_input">
					{{$LDSeveralInsurances}}
				</td>
				</tr>
			{{/if}}

				{{* The following tags contain rows patterned after the  "registration_admission/reg_row.tpl" template *}}

				{{$sFax}}
				{{$sSSSNr}}
				{{$sReligion}}
		
			{{if $bShowOtherHospNr}}
				<tr>
				<td class="reg_item" valign=top class="reg_input">
					{{$LDOtherHospitalNr}}
				</td>
				<td colspan=2 class="reg_input">
					{{$sOtherNr}}
					{{$sOtherNrSelect}}
				</td>
				</tr>
			{{/if}}
			{{if $sDiagnosisInput}}
                                <tr>
				<td class="reg_item">
					{{$LDDiagnosis}}
				</td>
				<td colspan=2 class="reg_input">
					{{$sDiagnosisInput}}
				</td>
			        </tr>
			{{/if}}
<!-- Imageniologia -->
				<tr>
				<td class="reg_item">
					{{$LDImaging}}
				</td>
				<td colspan=2 class="reg_input">
					{{$sImagingInput}}
				</td>

<!-- Observaciones -->
				<tr>
				<td class="reg_item">
					{{$LDComments}}
				</td>
				<td colspan=2 class="reg_input">
					{{$sCommentsInput}}
				</td>

				<tr>
				<td class="reg_item">
					{{$LDRegBy}}
				</td>
				<td colspan=2 class="reg_input">
					{{$sRegByInput}}
				</td>
			</tr>
		</table>

		{{$sHiddenInputs}}
		{{$sUpdateHiddenInputs}}
		<p>
		{{$pbSubmit}} &nbsp;&nbsp; {{$pbReset}} {{$pbForceSave}}

		{{if $bSetAsForm}}
		</form>
		{{/if}}

		{{$sNewDataForm}}
